package com.acoreful.acf2java.commons.redis;

/**
 * 所有redis的key统一写在这里
 * 
 */
public abstract class RedisKeys {
    
    private static final String DELIMITER = ":"; // 分隔符
    
    // -------------------------------- app --------------------------------
    private static final String APP_USER_TOKEN = "acf2java:app:userToken"; // 用户登录令牌
    
    private static final String APP_SMS_CAPTCHA = "acf2java:app:smsCaptcha";//手机短信验证码
	
	public static String appUserToken(String token) {
        return APP_USER_TOKEN + DELIMITER + token;
    }
    
    public static String appSmsCaptcha(String mobile){
        return APP_SMS_CAPTCHA + DELIMITER + mobile;
    }
    
	// ------------------------------- admin --------------------------------
    private static final String ADMIN_CAPTCHA = "acf2java:admin:captcha"; // 图片验证码
    
    private static final String ADMIN_STAFF_TOKEN = "acf2java:admin:staffToken"; // 员工登录令牌
    
    public static String adminCaptcha(String token) {
        return ADMIN_CAPTCHA + DELIMITER + token;
    }
    
    public static String adminStaffToken(String token) {
        return ADMIN_STAFF_TOKEN + DELIMITER + token;
    }

}
